package wangxu

import (
	"context"
	"github.com/beherochuling/beesoft_api/app/dao"
	"github.com/beherochuling/beesoft_api/app/helper/net/websocket"
	"github.com/beherochuling/beesoft_api/app/model/entity"
)

func IsFormer(ws *websocket.Websocket) bool {
	return true
}

var Model = modelService{}

type modelService struct {
}

func (r *modelService) fd() uint {
	return 0
}
func (r *modelService) Code(ctx context.Context) uint64 {
	var item entity.LetsviewConnections
	err := dao.LetsviewConnections.Ctx(ctx).
		Where(dao.LetsviewConnections.Columns().Fd, r.fd()).
		Scan(&item)
	if err != nil {
		panic(err)
	}

	return item.Code
}
